package com.heima;

import com.heima.pojo.UserConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Day64SpringBoot01Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Day64SpringBoot01Application.class, args);
        Object user = context.getBean("user");
        System.out.println(user);

        UserConfig bean = context.getBean(UserConfig.class);
        System.out.println(bean.user());
    }

}
